package com.t11;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * Created by xuyiwei on 2018/7/22.
 */
class Outer{
    private String s;
    public Outer(String s) {
        this.s = s;
    }

    public String getS() {
        return s;
    }

    public void setS(String s) {
        this.s = s;
    }

    @Override
    public String toString() {
        return "Outer{" +
                "s='" + s + '\'' +
                '}';
    }
}
public class E07 {
    public static void main(String[] args) {
        Outer[] outers = {new Outer("A"),new Outer("B"),new Outer("C"),new Outer("D")};
        List<Outer> list = new ArrayList<>();
        list.addAll(Arrays.asList(outers));
        List<Outer> sub = list.subList(1,2);
        list.removeAll(sub);
        System.out.println(list);
    }
}
